package com.github.ecbp.user.service.service;

import com.github.ecbp.common.data.service.BaseService;
import com.github.ecbp.user.service.entity.TMenu;
import com.github.ecbp.user.service.entity.TRole;
import com.github.ecbp.user.service.entity.TRoleMenuRelation;

import java.util.List;
import java.util.Set;

/**
 * @name: RoleMenuRelationService
 * @description:
 * @author: zhangj
 * @create: 2020-05-07 18:21
 **/
public interface RoleMenuRelationService extends BaseService<TRoleMenuRelation> {
    /**
     * 通过角色ID查询菜单信息
     *
     * @param roleId
     * @return java.util.Set<com.ecbp.service.user.entity.TMenu>
     * @author zj2626
     * @date 2020/5/12
     */
    List<TMenu> getMenuByRoleId(Long roleId);

    /**
     * 通过角色ID查询菜单信息
     *
     * @param roleIds
     * @return java.util.Set<com.ecbp.service.user.entity.TMenu>
     * @author zj2626
     * @date 2020/5/12
     */
    List<TMenu> getMenuByRoleId(Set<Long> roleIds);

    /**
     * 通过菜单ID查询角色信息
     *
     * @param menuId
     * @return java.util.Set<com.ecbp.service.user.entity.TRole>
     * @author zj2626
     * @date 2020/5/12
     */
    List<TRole> getRoleByMenuId(Long menuId);

    /**
     * 通过菜单ID查询角色信息
     *
     * @param menuIds
     * @return java.util.Set<com.ecbp.service.user.entity.TRole>
     * @author zj2626
     * @date 2020/5/12
     */
    List<TRole> getRoleByMenuId(Set<Long> menuIds);
}
